package org.shangrila.bme.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;
import java.math.BigDecimal;


/**
 * The persistent class for the bme_material database table.
 * 
 */
@Entity
@Table(name="bme_material")
@NamedQuery(name="BmeMaterial.findAll", query="SELECT b FROM BmeMaterial b")
public class BmeMaterial implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String mmodel;

	private String mdesc;

	private String msort;

	private String mtype;

	private String munit;

	@Column(name="PURCH_PRICE")
	private BigDecimal purchPrice;

	private String remarks;

	@Column(name="SALE_PRICE")
	private BigDecimal salePrice;

	//bi-directional many-to-one association to BmeAcceptionDetail
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeAcceptionDetail> bmeAcceptionDetails;

	//bi-directional many-to-one association to BmeContProd
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeContProd> bmeContProds;

	//bi-directional many-to-one association to BmeContPurch
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeContPurch> bmeContPurches;

	//bi-directional many-to-one association to BmePayrollDetail
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmePayrollDetail> bmePayrollDetails;

	//bi-directional many-to-one association to BmePurchDetail
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmePurchDetail> bmePurchDetails;

	//bi-directional many-to-one association to BmeReceiptDetail
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeReceiptDetail> bmeReceiptDetails;

	//bi-directional many-to-one association to BmeRptInfo
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeRptInfo> bmeRptInfos;

	//bi-directional many-to-one association to BmeSaleoutDetail
	@OneToMany(mappedBy="bmeMaterial")
	private List<BmeSaleoutDetail> bmeSaleoutDetails;

	public BmeMaterial() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMdesc() {
		return this.mdesc;
	}

	public void setMdesc(String mdesc) {
		this.mdesc = mdesc;
	}

	public String getMsort() {
		return this.msort;
	}

	public void setMsort(String msort) {
		this.msort = msort;
	}

	public String getMtype() {
		return this.mtype;
	}

	public void setMtype(String mtype) {
		this.mtype = mtype;
	}

	public String getMunit() {
		return this.munit;
	}

	public void setMunit(String munit) {
		this.munit = munit;
	}

	public BigDecimal getPurchPrice() {
		return this.purchPrice;
	}

	public void setPurchPrice(BigDecimal purchPrice) {
		this.purchPrice = purchPrice;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public BigDecimal getSalePrice() {
		return this.salePrice;
	}

	public void setSalePrice(BigDecimal salePrice) {
		this.salePrice = salePrice;
	}

	public List<BmeAcceptionDetail> getBmeAcceptionDetails() {
		return this.bmeAcceptionDetails;
	}

	public void setBmeAcceptionDetails(List<BmeAcceptionDetail> bmeAcceptionDetails) {
		this.bmeAcceptionDetails = bmeAcceptionDetails;
	}

	public BmeAcceptionDetail addBmeAcceptionDetail(BmeAcceptionDetail bmeAcceptionDetail) {
		getBmeAcceptionDetails().add(bmeAcceptionDetail);
		bmeAcceptionDetail.setBmeMaterial(this);

		return bmeAcceptionDetail;
	}

	public BmeAcceptionDetail removeBmeAcceptionDetail(BmeAcceptionDetail bmeAcceptionDetail) {
		getBmeAcceptionDetails().remove(bmeAcceptionDetail);
		bmeAcceptionDetail.setBmeMaterial(null);

		return bmeAcceptionDetail;
	}

	public List<BmeContProd> getBmeContProds() {
		return this.bmeContProds;
	}

	public void setBmeContProds(List<BmeContProd> bmeContProds) {
		this.bmeContProds = bmeContProds;
	}

	public BmeContProd addBmeContProd(BmeContProd bmeContProd) {
		getBmeContProds().add(bmeContProd);
		bmeContProd.setBmeMaterial(this);

		return bmeContProd;
	}

	public BmeContProd removeBmeContProd(BmeContProd bmeContProd) {
		getBmeContProds().remove(bmeContProd);
		bmeContProd.setBmeMaterial(null);

		return bmeContProd;
	}

	public List<BmeContPurch> getBmeContPurches() {
		return this.bmeContPurches;
	}

	public void setBmeContPurches(List<BmeContPurch> bmeContPurches) {
		this.bmeContPurches = bmeContPurches;
	}

	public BmeContPurch addBmeContPurch(BmeContPurch bmeContPurch) {
		getBmeContPurches().add(bmeContPurch);
		bmeContPurch.setBmeMaterial(this);

		return bmeContPurch;
	}

	public BmeContPurch removeBmeContPurch(BmeContPurch bmeContPurch) {
		getBmeContPurches().remove(bmeContPurch);
		bmeContPurch.setBmeMaterial(null);

		return bmeContPurch;
	}

	public List<BmePayrollDetail> getBmePayrollDetails() {
		return this.bmePayrollDetails;
	}

	public void setBmePayrollDetails(List<BmePayrollDetail> bmePayrollDetails) {
		this.bmePayrollDetails = bmePayrollDetails;
	}

	public BmePayrollDetail addBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().add(bmePayrollDetail);
		bmePayrollDetail.setBmeMaterial(this);

		return bmePayrollDetail;
	}

	public BmePayrollDetail removeBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().remove(bmePayrollDetail);
		bmePayrollDetail.setBmeMaterial(null);

		return bmePayrollDetail;
	}

	public List<BmePurchDetail> getBmePurchDetails() {
		return this.bmePurchDetails;
	}

	public void setBmePurchDetails(List<BmePurchDetail> bmePurchDetails) {
		this.bmePurchDetails = bmePurchDetails;
	}

	public BmePurchDetail addBmePurchDetail(BmePurchDetail bmePurchDetail) {
		getBmePurchDetails().add(bmePurchDetail);
		bmePurchDetail.setBmeMaterial(this);

		return bmePurchDetail;
	}

	public BmePurchDetail removeBmePurchDetail(BmePurchDetail bmePurchDetail) {
		getBmePurchDetails().remove(bmePurchDetail);
		bmePurchDetail.setBmeMaterial(null);

		return bmePurchDetail;
	}

	public List<BmeReceiptDetail> getBmeReceiptDetails() {
		return this.bmeReceiptDetails;
	}

	public void setBmeReceiptDetails(List<BmeReceiptDetail> bmeReceiptDetails) {
		this.bmeReceiptDetails = bmeReceiptDetails;
	}

	public BmeReceiptDetail addBmeReceiptDetail(BmeReceiptDetail bmeReceiptDetail) {
		getBmeReceiptDetails().add(bmeReceiptDetail);
		bmeReceiptDetail.setBmeMaterial(this);

		return bmeReceiptDetail;
	}

	public BmeReceiptDetail removeBmeReceiptDetail(BmeReceiptDetail bmeReceiptDetail) {
		getBmeReceiptDetails().remove(bmeReceiptDetail);
		bmeReceiptDetail.setBmeMaterial(null);

		return bmeReceiptDetail;
	}

	public List<BmeRptInfo> getBmeRptInfos() {
		return this.bmeRptInfos;
	}

	public void setBmeRptInfos(List<BmeRptInfo> bmeRptInfos) {
		this.bmeRptInfos = bmeRptInfos;
	}

	public BmeRptInfo addBmeRptInfo(BmeRptInfo bmeRptInfo) {
		getBmeRptInfos().add(bmeRptInfo);
		bmeRptInfo.setBmeMaterial(this);

		return bmeRptInfo;
	}

	public BmeRptInfo removeBmeRptInfo(BmeRptInfo bmeRptInfo) {
		getBmeRptInfos().remove(bmeRptInfo);
		bmeRptInfo.setBmeMaterial(null);

		return bmeRptInfo;
	}

	public List<BmeSaleoutDetail> getBmeSaleoutDetails() {
		return this.bmeSaleoutDetails;
	}

	public void setBmeSaleoutDetails(List<BmeSaleoutDetail> bmeSaleoutDetails) {
		this.bmeSaleoutDetails = bmeSaleoutDetails;
	}

	public BmeSaleoutDetail addBmeSaleoutDetail(BmeSaleoutDetail bmeSaleoutDetail) {
		getBmeSaleoutDetails().add(bmeSaleoutDetail);
		bmeSaleoutDetail.setBmeMaterial(this);

		return bmeSaleoutDetail;
	}

	public BmeSaleoutDetail removeBmeSaleoutDetail(BmeSaleoutDetail bmeSaleoutDetail) {
		getBmeSaleoutDetails().remove(bmeSaleoutDetail);
		bmeSaleoutDetail.setBmeMaterial(null);

		return bmeSaleoutDetail;
	}

	public String getMmodel() {
		return mmodel;
	}

	public void setMmodel(String mmodel) {
		this.mmodel = mmodel;
	}

}